package com.itasura.annot.service;

import com.itasura.annot.annotation.LoginAnnotation;
import com.itasura.annot.entity.User;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * @author sailor wang
 * @date 2018/11/15 5:13 PM
 * @description
 */
@Slf4j
@Service
public class UserService {

    @LoginAnnotation
    public User login(Long userId) {
        log.info("get user from db .....");
        User user = new User();
        user.setId(userId);
        user.setName("asura");
        return user;
    }
}